<?
include 'config.inc.php';
$username = @$_POST['username'];
$password = @$_POST['password'];
$set_nickname = @$_POST['set_nickname'];
$name_value = @$_POST['name_value'];
include 'member.php';
if($name_value ==''){
 echo '修改的昵称不能为空';
 exit;
}else{
  $sql_name = mysql_query("UPDATE wwk_chat_user SET nickname = '{$name_value}' WHERE username = '{$username}'");
}
if(!$sql_name){
 echo '修改失败';
}else{
  echo '修改成功：'.$name_value;
     //更新聊天记录表的
	  mysql_query("update wwk_chat_msg set nickname='{$name_value}' WHERE username='{$username}'");
}
